{include file="header.html"}
<body class="body-main">
<ul id="admin_sub_title">
	<li class="sub"><a href="javascript:void(0)" onClick="selectTab('config0',this)">域名设置</a></li>
	<li class="unsub"><a href="javascript:void(0)" onClick="selectTab('config1',this)">站点模式</a></li>
	<li class="unsub"><a href="javascript:void(0)" onClick="selectTab('config2',this)">内容模式(<font color="red">new</font>)</a></li>
	<li class="unsub"><a href="javascript:void(0)" onClick="selectTab('config5',this)">URL设置</a></li>
	<li class="unsub"><a href="javascript:void(0)" onClick="selectTab('config3',this)">MIP设置</a></li>
	<li class="unsub"><a href="javascript:void(0)" onClick="selectTab('config4',this)">手机版设置</a></li>
	<li class="unsub"><a href="javascript:void(0)" onClick="selectTab('config6',this)">其他设置</a></li>
</ul>
<div id="admin_right_b">
<form method="post">
<input type="hidden" name="r[id]" value="{$id|default:0}">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config0">
	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> 域名设置</td>
		<td></td>
	</tr>
	<tr>
      <td width="100" align="right" class="config_td_first">分组名称：</td>
      <td class="tdbg" colspan="4"><input name="r[name]" type="text" value="{$name}" class="input" size="20"> <font color="#ff3300">*</font> <span>给本分组起个名字</span></td>
    </tr>
	<tr>
      <td align="right" class="config_td_first">配置文件夹（<font color="red">不可重复</font>）</td>
      <td class="tdbg" colspan="4"><input name="r[dirname]" id="dirname" type="text" value="{$dirname}" class="input" size="20"> <font color="#ff3300">*</font> <font size="" color="red">填字母数字</font>，<span>分组的关键词和外链将放在此文件夹</span></td>
    </tr>
	<tr>
	  <td align="right" class="config_td_first">所属模型：</td>
	  <td class="tdbg"><select name="r[cid]" id="cid">
	  {foreach $classlist as $vo}
		<option dir="{$vo.dirname}" value="{$vo.id}" {if $vo['id']==$cid}selected="selected"{/if}>{$vo.name}</option>
	  {/foreach}
	  </select> <span></span></td>
	</tr>
	<tr>
	 <td align="right" class="config_td_first">根域名(<font color="red">非子域名</font>)<br>一行一个，不加端口</td>
	  <td><textarea name="domain" id="text" type="text" style="height:220px;width:350px;">{$domain}</textarea></td>
	</tr>
	
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config1" style="display:none">
	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> 站点模式</td>
		<td></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">站点模式：</td>
	  <td><select name="r[domain_mod]">
		<option value="1" {if !$domain_mod || $domain_mod=='1'} selected="selected"{/if}>泛域名</option>
		<option value="2" {if $domain_mod=='2'} selected="selected"{/if}>单域名</option>
	  </select>&nbsp;&nbsp;<span>泛域名需泛解析</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">301重定向到www：</td>
	  <td class="icheck_radios"><label><input type="radio" name="con[rewww]" value="1" {if $rewww==1} checked{/if}>全部重定向</label>
			<label><input type="radio" name="con[rewww]" value="2" {if $rewww==2} checked{/if}>顶级域名重定向</label>
			<label><input type="radio" name="con[rewww]" value="0" {if !$rewww} checked{/if}>关闭</label></td>
	</tr>
	<tr class="tdbg">
      <td align="right" class="config_td_first">泛域名前缀：</td>
      <td class="icheck_radios prefix_type"><label><input type="radio" name="con[prefix_type]" value="1"{if $prefix_type} checked{/if} onclick="$('.make').show();$('.automake').hide();">自定义（<font color="red">推荐</font>）</label>
			<label><input type="radio" name="con[prefix_type]" value="0"{if !$prefix_type} checked{/if} onclick="$('.automake').show();$('.make').hide();">自动生成</label>
			 <span class="tips"></span>
		</td>
    </tr>
	<script type="text/javascript">
		$('.prefix_type input').on('ifChecked ifClicked', function(event){
			if(this.value==1){
				$('.make').show();$('.automake').hide();
			}
			if(this.value==0){
				$('.automake').show();$('.make').hide();
			}
		});
	</script>
	<tr {if $prefix_type} style="display:none"{/if} class="automake">
      <td align="right" class="config_td_first">自动生成前缀：</td>
      <td class="tdbg">生成级数：<input name="con[prefix_leve]" type="text" class="input" size="2" value="{$prefix_leve|default:1}">&nbsp;级 ，随机范围：<input name="con[prefix_start]" type="text" class="input" size="2" value="{$prefix_start|default:5}">&nbsp;至&nbsp;<input name="con[prefix_end]" type="text" class="input" size="2" value="{$prefix_end|default:5}">&nbsp;位数</td>
    </tr>
	<tr {if !$prefix_type} style="display:none"{/if} class="make">
	  <td align="right" class="config_td_first">屏蔽非自定义泛前缀访问</td>
	  <td class="tdbg icheck_radios"><label><input type="radio" name="con[ban_prefix]" value="1" {if $ban_prefix} checked{/if}>开启</label>
			<label><input type="radio" name="con[ban_prefix]" value="0" {if !$ban_prefix} checked{/if}>关闭</label>　<span>屏蔽非自定义泛前缀的域名访问</span></td>
	</tr>
	<tr {if !$prefix_type} style="display:none"{/if} class="make">
	  <td align="right" class="config_td_first">启用城市泛域名(<font color="red">new</font>)</td>
	  <td class="tdbg icheck_radios"><label><input type="radio" name="con[city_prefix]" value="1" {if $city_prefix} checked{/if}>开启</label>
			<label><input type="radio" name="con[city_prefix]" value="0" {if !$city_prefix} checked{/if}>关闭</label>　<span style="color:red">开启后自动将城市拼音加入泛域名前缀列表</span></td>
	</tr>
	<tr {if !$prefix_type} style="display:none"{/if} class="make">
		<td></td>
		<td class="tdbg"><font color="blue">注：如果前缀使用了标签并且超过50个，不要屏蔽，否则会卡</font></td>
	</tr>
	<tr {if !$prefix_type} style="display:none"{/if} class="make">
	 <td align="right" class="config_td_first">自定义泛域名前缀：<br>(一行一个<br>注：不要超过1000)</td>
	  <td><span class="red">支持标签：{数字}、{字母}、{数字字母}<br>标签后面加数字是位数，{数字8}表示8个数字、{数字1-8}示随机1-8个数字<br></span><textarea name="domain_prefix" type="text" style="height:180px;width:350px;">{$domain_prefix}</textarea></td>
	</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config5" style="display:none">
	<tr class="tdbg item_title">
		<td width="160" align="right"><i class="typcn typcn-cog"></i> URL设置</td>
		<td></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">URL模式：</td>
	  <td><select name="r[urltype]">
		<option value="1" {if $urltype==1} selected="selected"{/if}>随机模式</option>
		<option value="2" {if $urltype==2} selected="selected"{/if}>固定模式</option>
	  </select>&nbsp;&nbsp;<span>即模型里的2套URL模式选择</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">URL缓存开关：</td>
	  <td><select name="con[urlrules_cache]">
		<option value="1" {if $urlrules_cache || $urlrules_cache==''} selected="selected"{/if}>开启</option>
		<option value="0" {if $urlrules_cache=='0'} selected="selected"{/if}>关闭</option>
	  </select>&nbsp;&nbsp;<span>开启后可实现一个站点固定一条url规则，不开启则随机获取</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">URL路径：</td>
	  <td class="tdbg icheck_radios"><label><input type="radio" name="con[url_prefix]" value="1" {if $url_prefix==1 || $url_prefix==''} checked{/if}>绝对路径</label>
			<label><input type="radio" name="con[url_prefix]" value="2" {if $url_prefix==2} checked{/if}>相对路径</label>　<span>相对路径不带域名</span></td>
	</tr>
	<tr>
		<td align="right" class="config_td_first">屏蔽非URL规则地址(<font color="#ff6600">new</font>)</td>
		<td class="icheck_radios">
			<label><input type="radio" name="con[urlrule_ban]" value="1" {if $urlrule_ban} checked{/if}>开启</label>
			<label><input type="radio" name="con[urlrule_ban]" value="0" {if !$urlrule_ban} checked{/if}>关闭</label>
			<span class="tips">不符合设置的URL规则就显示404</span>
		</td>
	</tr>
	<tr class="tdbg">
      <td align="right" class="config_td_first">图片URL规则：</td>
      <td><input name="con[urlrule_pic]" type="text" value="{$urlrule_pic}" class="input" size="30"> <font color="#ff3300">*</font> <br><span>开启图片url本地化时（<u style="color:red">句子模式下</u>）有效，必须带上<font color="red">{id}</font>且不支持标签</span></td>
    </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config2" style="display:none">
	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> 内容模式设置</td>
		<td></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">导航缓存：</td>
	  <td><select name="con[menu_cache]">
		<option value="1" {if $menu_cache} selected="selected"{/if}>开启</option>
		<option value="0" {if !$menu_cache} selected="selected"{/if}>关闭</option>
	  </select>&nbsp;&nbsp;<span>开启后可实现当前域名固定导航</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">内容库类型(<font color="red">new</font>)：</td>
	  <td class="icheck_radios">
			<label><input type="radio" name="con[dbtype]" value="1" {if $dbtype==1 || !$dbtype} checked{/if}>模型公共内容库</label>
			<label><input type="radio" name="con[dbtype]" value="2" {if $dbtype==2} checked{/if}>本分组独立内容库</label>
			 <font color="#ff3300">*</font> <span>使用模型公共内容库还是本独立分组下的内容库</span>
	</tr>
	
	<tr class="tdbg">
	  <td align="right" class="config_td_first">内容类型：</td>
	  <td><select name="r[bodytype]">
		<option value="1" {if $bodytype==1} selected="selected"{/if}>文章库内容</option>
		<option value="2" {if $bodytype==2} selected="selected"{/if}>句子拼凑</option>
	  </select>&nbsp;&nbsp;</td>
	</tr>
	<tr>
	  <td align="right" class="tdbg">注：</td>
	  <td><font color="red">1. 选择文章库内容时，标题、缩略图等从文章库内容中提取<br>2. 选择句子拼凑时，标题是从标题库中提取<br>3. 句子拼凑的格式可在 <font color="blue">TKDB调用模板->内容模板中设置</font></font></td>
	</tr>
	<tr>
      <td align="right" class="config_td_first">内容句子调用条数：</td>
      <td class="tdbg"><input name="con[maxnum_content]" type="text" value="{$maxnum_content}" class="input" size="10"> <font color="#ff3300">*</font> <span>(<u>句子拼凑时</u>)内容模板句子的<font color="red">可调用条数</font>，默认60条，<font size="" color="red">建议100以下，否则影响性能</font></span></td>
    </tr>
	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> 自定义库设置</td>
		<td><font color="red" style="font-weight:500">（这里可以单独自定义某个类型的库文件）</font></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">自定义网站名称库：</td>
	  <td><input name="con[webnamefile]" type="text" id="webnamefile" value="{$webnamefile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'webnamefile','webname',$('#cid').find('option:selected').attr('dir'));" type="button" class="button">选择</button> <span>即网站名称，不填则随机取自网站名称库</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">自定义栏目库：</td>
	  <td><input name="con[typefile]" type="text" id="typefile" value="{$typefile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'typefile','typename',$('#cid').find('option:selected').attr('dir'));" type="button" class="button">选择</button> <span>即网站栏目，不填则随机取自栏目库</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">自定义标题库：</td>
	  <td><input name="con[titlefile]" type="text" id="titlefile" value="{$titlefile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'titlefile','title',$('#cid').find('option:selected').attr('dir'));" type="button" class="button">选择</button> <span>内容类型为<font color="blue">句子拼凑</font>时使用，不填则随机取自标题库</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">自定义句子库：</td>
	  <td><input name="con[contentfile]" type="text" id="contentfile" value="{$contentfile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'contentfile','content',$('#cid').find('option:selected').attr('dir'));" type="button" class="button">选择</button> <span>不填则随机取自句子库</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">自定义图片库：</td>
	  <td><input name="con[picfile]" type="text" id="picfile" value="{$picfile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'picfile','pic',$('#cid').find('option:selected').attr('dir'));" type="button" class="button">选择</button> <span>不填则随机取自图片库，一般句子模式时使用到</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">自定义文章库：</td>
	  <td><input name="con[articlefile]" type="text" id="articlefile" value="{$articlefile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'articlefile','article',$('#cid').find('option:selected').attr('dir'));" type="button" class="button">选择</button> <span>内容类型为<font color="blue">文章库</font>时使用，不填则随机取自文章库</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">企业简介句子：</td>
	  <td><input name="con[qyjjfile]" type="text" id="qyjjfile" value="{$qyjjfile}" class="input" size="35"> <button onclick="window.parent.select_file(document,'qyjjfile','common/','/');" type="button" class="button">选择</button> <span>模型为<font color="blue">企业</font>时使用，不填则使用默认的</span></td>
	</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config3" style="display:none">

	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> MIP模块设置</td>
		<td></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">是否MIP站点：</td>
	  <td><select name="con[mip_open]">
		<option value="1" {if $mip_open} selected="selected"{/if}>是</option>
		<option value="0" {if !$mip_open} selected="selected"{/if}>否</option>
	  </select>&nbsp;&nbsp;<span>当前站点是否设为MIP站点，MIP站点使用MIP模板</span></td>
	</tr>
	<tr>
      <td align="right" class="config_td_first">mip域名前缀：</td>
      <td class="tdbg" colspan="4"><input name="con[mip_prefix]" type="text" value="{$mip_prefix}" class="input" size="10"> <span>mip域名前缀，如：mip，当域名前缀为该设置时设为MIP站点</span></td>
    </tr>
	<tr>
	  <td class="tdbg">&nbsp;</td>
	  <td><font color="red">注：mip域名前缀设置为空时，本分组下的全部域名都视为MIP站点（请关闭手机版)</font></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">无视MIP效验：</td>
	  <td><select name="con[mip_nosee]">
		<option value="1" {if $mip_nosee} selected="selected"{/if}>开启</option>
		<option value="0" {if !$mip_nosee} selected="selected"{/if}>关闭</option>
	  </select>&nbsp;<span><font color="red">关闭后，广告、统计将失效，以便通过MIP效验</font></span></td>
	</tr>
	<!-- <tr>
	  <td class="tdbg">&nbsp;</td>
	  <td><font color="red">· 关闭才能通过效验，不过统计广告这些自定义js是无法通过效验的<br>· 通不过效验就进不了百度MIP索引，变成普通站点</font></td>
	</tr> -->
	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> MIP统计设置</td>
		<td><font color="blue" style="font-weight:500">（MIP引擎只支持以下统计，开启无视MIP效验时，将使用系统设置里的）</font></td>
	</tr>
	<tr>
      <td align="right" class="config_td_first">百度统计token：</td>
      <td class="tdbg" colspan="4"><input name="con[mip_tj_bdtk]" type="text" value="{$mip_tj_bdtk}" class="input" size="20"> <span>百度统计代码里的token的值，一般是32位的字符</span></td>
    </tr>
	<tr>
      <td align="right" class="config_td_first">cnzz统计token：</td>
      <td class="tdbg" colspan="4"><input name="con[mip_tj_cnzztk]" type="text" value="{$mip_tj_cnzztk}" class="input" size="20"> <span>cnzz友盟统计的token，一般是一串数字</span></td>
    </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config4" style="display:none">
	<tr class="tdbg item_title">
		<td width="100" align="right"><i class="typcn typcn-cog"></i> 手机版设置</td>
		<td></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">开启手机版：</td>
	  <td><select name="con[mobile_open]">
		<option value="1" {if $mobile_open} selected="selected"{/if}>开启</option>
		<option value="0" {if !$mobile_open} selected="selected"{/if}>关闭</option>
	  </select>&nbsp;&nbsp;<span>是否开启手机版</span></td>
	</tr>
	<tr class="tdbg">
	  <td align="right" class="config_td_first">地址跳转：</td>
	  <td><select name="con[mobile_jump]">
		<option value="1" {if $mobile_jump} selected="selected"{/if}>开启</option>
		<option value="0" {if !$mobile_jump} selected="selected"{/if}>关闭</option>
	  </select>&nbsp;&nbsp;<span>手机访问时自动转到手机版地址</span></td>
	</tr>
	<tr>
      <td align="right" class="config_td_first">手机域名前缀：</td>
      <td class="tdbg" colspan="4"><input name="con[mobile_prefix]" type="text" value="{$mobile_prefix}" class="input" size="10"> <span>手机版域名前缀，如：m 或者 wap，<font color="red">留空则全部打开都是手机版</font></span></td>
    </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableConfig" id="config6" style="display:none">
	
	<tr class="tdbg item_title">
		<td width="120" align="right"><i class="typcn typcn-cog"></i> 其他设置</td>
		<td></td>
	</tr>
	<tr class="tdbg">
      <td align="right" class="config_td_first">其他模板内容标签调用：</td>
      <td class="icheck_radios"><label><input type="radio" name="con[is_show_tpl]" value="1"{if $is_show_tpl} checked{/if}>开启</label>
			<label><input type="radio" name="con[is_show_tpl]" value="0"{if !$is_show_tpl} checked{/if}>关闭</label>
			 <span>开启后非show模板，也可以使用内容页show的标签，如 $body</span>
		</td>
    </tr>
	<tr class="tdbg">
      <td align="right" class="config_td_first">sitemap开关：</td>
      <td class="icheck_radios"><label><input type="radio" name="con[sitemap_open]" value="1"{if $sitemap_open=='1' || $sitemap_open==''} checked{/if}>开启</label>
			<label><input type="radio" name="con[sitemap_open]" value="0"{if $sitemap_open=='0'} checked{/if}>关闭</label>
			 <span>关闭后，打开sitemap地图将显示404</span>
		</td>
    </tr>
	<tr class="tdbg item_title">
		<td width="120" align="right"><i class="typcn typcn-cog"></i> 独立设置</td>
		<td>( <font style="font-weight:500;color:red">独立设置优先于全局设置</font> )</td>
	</tr>
	<tr class="tdbg">
      <td align="right" class="config_td_first"><font color="red">独立</font>屏蔽游客访问：</td>
      <td class="icheck_radios"><label><input type="radio" name="con[user_ban]" value="1"{if $user_ban==1} checked{/if}>是</label>
			<label><input type="radio" name="con[user_ban]" value="0"{if $user_ban=='0'} checked{/if}>否</label>
			<label><input type="radio" name="con[user_ban]" value="2"{if $user_ban=='2' || $user_ban==''} checked{/if}>跟随全局设置</label>
			 <span class="tips">禁止非蜘蛛用户访问</span>
			</td>
    </tr>

	<tr class="tdbg">
      <td align="right" class="config_td_first"><font color="red">独立</font>游客访问跳转：</td>
      <td class="icheck_radios"><label><input type="radio" name="con[user_jump]" value="1"{if $user_jump==1} checked{/if}>是</label>
			<label><input type="radio" name="con[user_jump]" value="0"{if $user_jump=='0'} checked{/if}>否</label>
			<label><input type="radio" name="con[user_jump]" value="2"{if $user_jump=='2' || $user_jump==''} checked{/if}>跟随全局设置</label>
			 <span class="tips">非蜘蛛用户访问后自动跳转到指定地址</span>
			</td>
    </tr>

    <tr class="tdbg">
      <td width="150" align="right" class="config_td_first"><font color="red">独立</font>游客跳转地址：</td>
      <td class="tdbg"><input name="con[user_jumpurl]" type="text" class="input" value="{$user_jumpurl|default:'http://'}" size="60"></td>
    </tr>

	<tr class="tdbg">
      <td align="right" class="config_td_first"><font color="red">独立</font>流量统计代码：</td>
      <td><textarea name="con[tongji]"  rows="3"  class="inputs" style="width:450px;">{$tongji}</textarea></td>
    </tr>

</table>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
	<tr>
	  <td width="120" align="center" class="tdbg">&nbsp;</td>
	  <td><button type="button" id="dosave" class="button button_submit">提交保存</button></td>
	</tr>
	</table>
</form>
<script type="text/javascript">
$("#dosave").click(function(){
		var _this=this;
		$(_this).html('正在保存...').attr('disabled','disabled');
		$.ajax({
			type:"post",
			url:"?admin-domain-update",
			data:$("form").serialize(),
			dataType:'json',
			timeout:28000,
			global:false,
			success:function(data){
				if(data.status==1){
					showAlert('success',data.info);
					setTimeout(function(){ var win = art.dialog.open.origin;win.location.reload(); top.art.dialog.list['openifrm'].close(); },2000);
				}else{
					showAlert('error',data.info);
				}
				$(_this).html('提交保存').attr('disabled',false);
			}
		});
	 return false;
	});
</script>
</body>
</html>